﻿
using UnityEngine;
using FairyGUI;
 public static class ObjectUtil
{
	public static void GetPosition(this Transform transform, out float x, out float y, out float z) {
		var p = transform.position;
		x = p.x;
		y = p.y;
		z = p.z;
	}
	public static void GetLocalPosition(this Transform transform, out float x, out float y, out float z)
	{
		var p = transform.localPosition;
		x = p.x;
		y = p.y;
		z = p.z;
	}
	public static void GetLocalEulerAngles(this Transform transform, out float x, out float y, out float z)
	{
		var p = transform.localEulerAngles;
		x = p.x;
		y = p.y;
		z = p.z;
	}
	public static void GetEulerAngles(this Transform transform, out float x, out float y, out float z)
	{
		var p = transform.eulerAngles;
		x = p.x;
		y = p.y;
		z = p.z;
	}
	public static void GetLocalScale(this Transform transform, out float x, out float y, out float z)
	{
		var p = transform.localScale;
		x = p.x;
		y = p.y;
		z = p.z;
	}
	public static GTweener TweenMove(this GObject obj, float x,float y, float duration)
	{
		Vector2 endValue = new Vector2(x, y);
		return GTween.To(obj.xy, endValue, duration).SetTarget(obj, TweenPropType.XY);
	}
}

